/*按钮节流*/
import Vue from "vue";
const reduceExpenditure = Vue.directive("reduceExpenditure-button", {
  inserted: function (el, binding) {
    el.addEventListener("click", () => {
      // 判断按钮是否可点击if (!el.disabled)
      {
        el.disabled = true;
        setTimeout(() => {
          el.disabled = false;
        }, binding.value || 3000); //默认3秒节流时间}});},
      }
    });
  },
});
export { reduceExpenditure };
